import click
import uvicorn

from tree_rag.app import app


@click.command()
@click.option("--port", type=int, default=8000, help="Port to run the server on")
@click.option("--host", type=str, default="127.0.0.1", help="Host to run the server on")
def main(port, host="127.0.0.1"):
    """Run the Tree RAG server."""
    uvicorn.run(app, host=host, port=port)


if __name__ == "__main__":
    main()
